import { DiamondResize } from "@logicflow/extension";

class CustomDiamondNode extends DiamondResize.view {}

class CustomDiamondModel extends DiamondResize.model {
  // 设置矩形的形状属性：大小和圆角
  //   initNodeData(data) {
  //     super.initNodeData(data);
  //     this.width = 100;
  //     this.height = 50;
  //   }

  // 设置矩形的样式属性：边框颜色
  getNodeStyle() {
    const style = super.getNodeStyle();
    style.stroke = "#4078f2";
    style.fontSize = 20;
    return style;
  }
  // 设置边文本样式
  getTextStyle() {
    const style = super.getTextStyle();
    style.fontSize = 18;
    return style;
  }
}

export default {
  type: "c-diamond",
  view: CustomDiamondNode,
  model: CustomDiamondModel,
};
